home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0386.arc
/
WRKMENU.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1986-03-03
|
2KB
|
84 lines
LISTING 1 R:BASE 5000 PROGRAMMING NICHOLAS BARAN
$COMMAND
MAINPROC *(Main Command File)
*(WRKMENU.CMD: compile to WRKMENU.PRC)
set err mess off
set mess off
set err var dbcheck *(Define an error trapping variable)
set var dbcheck to -1
set var choice to 0
set var done to N
newpage
choose choice from menu1 *(Display Menu1 and Accept Selection)
if choice eq 0 then
set err mess on
set mess on
quit
endif
if choice eq 1 then
newpage
fillin dbname using "Enter database name or <ENTER> to Quit: " at 4 5
if dbname exists then
open .dbname *(Open the database specified at 4 5)
if dbcheck ne 0 then *(Use error trapping variable)
write "Sorry, database doesn't exist, press any key to continue."
pause
goto end *(processing skips to Label "End")
endif
while done eq N then
newpage
choose choice1 from menu2
if choice1 eq 1 then
newpage
list all
write "Press any key to continue"
pause
endif
if choice1 eq 2 then
newpage
list tables
fillin tablname using "Please select table or <ENTER> to Quit: " at 15 5
newpage
if tablname exists then
choose choice2 from menu3
if choice2 eq 1 then
load .tablname with prompts
endif
if choice2 eq 2 then
edit all from .tablname
endif
endif
endif
fillin done using "Are you done with this database? (Y/N) "
endwhile
endif
label end
endif
if choice eq 2 then
newpage
Fillin pathname using "Enter Path or <ENTER> to Quit: " at 4 5
if pathname exists then
dir .pathname
write "Press any key to continue"
pause
endif
endif
run mainproc in wrkmenu.prc
$MENU
menu1
column Main Menu (Esc to Exit) *(Specifies vertical menu and Heading)
Select a Database *(Selection 1)
List Files *(Selection 2)
$MENU
menu2
column Action Menu
List Tables and Columns
Work on the Database
$MENU
menu3
column Work Menu
Add Records
Display/Edit/Delete Records